package com.syncomponents.context.support;

/**
 * 消息处理器类型
 * 
 * @author sunkey
 * @date Jan 14, 2014
 */
public enum HandlerType {
    XML("xml"), JSON("json");

    private String value;

    private HandlerType(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public static HandlerType identifyHanderType(String content) {
        if (content.startsWith("{")) {
            return JSON;
        }
        return XML;
    }

}
